import Find from '@/views/Find'
import My from '@/views/My'
import Friend from '@/views/Friend'
import NotFond from '@/views/404'

import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter) // VueRouter插件初始化

// 创建了一个路由对象
const router = new VueRouter({
  // routes 路由规则们
  // route  一条路由规则 { path: 路径, component: 组件 }
  routes: [
    //redirect 重定向
    { path: '/', component: Find, redirect: '/qqqq' },

    { path: '/find', component: Find },
    { path: '/my/:shuai', component: My, name: 'My' },
    { path: '/friend/:ss/:mei', component: Friend, name: 'Friend' },
    { path: '*', component: NotFond, name: 'NotFond' },
  ]
})

export default router